var HIGHLIGHT_KEY = 'tm-highlight';
var EVENT_TYPE_KEY = 'tm-eventType';
var POST_CODE_KEY = 'tm-postalCode';


function getHightlightTM() {
    return parseInt(localStorage[HIGHLIGHT_KEY] || '1', 10);
}

function setHightlightTM(value) {
    localStorage[HIGHLIGHT_KEY] = value;
}

function getEventTypeTM() {
    return localStorage[EVENT_TYPE_KEY];
}

function setEventTypeTM(value) {
    localStorage[EVENT_TYPE_KEY] = value;
}

function getPostalCodeTM() {
    return localStorage[POST_CODE_KEY] || '';
}

function setPostalCodeTM(value) {
    localStorage[POST_CODE_KEY] = value;
}

function getJSONTM()
{
	var strUrl = "http://www.ticketmaster.co.uk/json/browse/" + getEventTypeTM() + "?select=n31";
	var randomnumber=Math.floor(Math.random()*100);
	strUrl+="&" + randomnumber;
	return strUrl;
}
